package ee.siimkaspar.subjects.controller;

import java.io.Serializable;
import java.util.Map;

import org.apache.log4j.Logger;
import org.apache.struts2.StrutsStatics;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.Preparable;
import com.opensymphony.xwork2.Validateable;

public abstract class BaseAction extends ActionSupport implements Serializable, Preparable, StrutsStatics, Validateable {

	protected static final String LOGGED_IN = "logged_in";
	protected Map<String, Object> session;

	@Override
	public void prepare() throws Exception {
		session = ActionContext.getContext().getSession();
		if (session == null) {
			Logger.getLogger(BaseAction.class).error("Session is null");
		}
	}

}
